{% set action = 'resource.edit_view' if is_edit else 'resource.read' %}

{% if current_filters %}
  {% set url = h.url_for(action, id=pkg.name,
                         resource_id=view.resource_id, view_id=view.id,
                         filters=current_filters) %}
{% else %}
  {% set url = h.url_for(action, id=pkg.name,
                         resource_id=view.resource_id, view_id=view.id) %}
{% endif %}

<li class="{% if is_selected %} active{% endif %}" data-id="{{ view.id }}">

  <a href="{{ url }}" data-id="{{ view.id }}">
    <i class="fa icon fa-{{ h.resource_view_icon(view) }}"></i>
    {{ view.title }}
  </a>
</li>
